<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <title>医院病房管理</title>
    <link rel="stylesheet" href="css/dashboard.css">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
</head>
<body>
    <div class="container">
        <header>
            <div class="header-content">
                <h1>医院病房管理系统</h1>
                <div class="user-info">
                    <span>欢迎, ${doctor.doctorName} 医生</span>
                    <a href="logout" class="logout-btn">
                        <i class="fas fa-sign-out-alt"></i> 退出登录
                    </a>
                </div>
            </div>
        </header>
        
        <div class="main-content">
            <nav class="sidebar">
                <ul>
                    <li>
                        <a href="javascript:void(0)" class="active" onclick="loadContent('doctor-info')">
                            <i class="fas fa-user-md"></i> 个人信息
                        </a>
                    </li>
                    <li>
                        <a href="javascript:void(0)" onclick="loadContent('ward-status')">
                            <i class="fas fa-hospital"></i> 科室病房情况
                        </a>
                    </li>
                    <li>
                        <a href="javascript:void(0)" onclick="loadContent('my-patients')">
                            <i class="fas fa-procedures"></i> 我的病人
                        </a>
                    </li>
                    <li>
                        <a href="javascript:void(0)" onclick="loadContent('admission')">
                            <i class="fas fa-user-plus"></i> 办理入院
                        </a>
                    </li>
                    <li>
                        <a href="javascript:void(0)" onclick="loadContent('discharge')">
                            <i class="fas fa-user-minus"></i> 办理出院
                        </a>
                    </li>
                    <li>
                        <a href="javascript:void(0)" onclick="loadContent('bed-transfer')">
                            <i class="fas fa-exchange-alt"></i> 办理换床
                        </a>
                    </li>
                </ul>
            </nav>
            
            <div id="mainArea" class="content">
                <!-- 默认显示医生信息页面 -->
                <jsp:include page="pages/doctor-info.jsp" />
            </div>
        </div>
    </div>

    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <script>
        function loadContent(page) {
            // 更新侧边栏选中状态
            document.querySelectorAll('.sidebar a').forEach(link => {
                link.classList.remove('active');
            });
            event.target.closest('a').classList.add('active');
            
            // 使用Ajax加载对应的页面内容
            $.ajax({
                url: '/0201/pages/' + page + '.jsp',
                success: function(response) {
                    $('#mainArea').html(response);
                },
                error: function() {
                    alert('页面加载失败，请重试');
                }
            });
        }
    </script>
</body>
</html> 